<script>
  import EntityLine from './EntityLine.svelte';

  let { stack, world, select, selected, zoomlevel } = $props();
  let style = $derived(zoomlevel ? `font-size: ${zoomlevel*0.6}px` : '');
</script>

<section class="environment">
  {#if stack !== undefined}
    <h3 {style}>-- Things here --</h3>
    {#each stack as entity}
      <EntityLine {world} onclick={select} {selected} item={entity} {zoomlevel} />
    {/each}
  {/if}
</section>
